package com.example.spring.security.repository;

import com.example.spring.security.entity.UserEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;

import java.util.Optional;

/**
 * @author : zhayh
 * @date : 2021-4-18 15:19
 * @description :
 */

@Repository
public interface UserRepository extends JpaRepository<UserEntity, Long> {
    // 根据用户名获取用户数据
    Optional<UserEntity> findByLogin(String login);
}
